User Contributed MET/CAL PROCEDURE ============================================================================= INSTRUMENT: KI Utilities DATE: 19-Feb-95 AUTHOR: User Contributed REVISION: 1.0 ADJUSTMENT THRESHOLD: 70% NUMBER OF TESTS: 1 NUMBER OF LINES: 149 ============================================================================= STEP FSC RANGE NOMINAL TOLERANCE MOD1 MOD2 3 4 CON # Keithley Instruments, Inc., does not and cannot warrant the performance or # results that may be obtained by using this program. The entire risk as to # the results and performance of this program is assumed by you. # # Neither Keithely Instruments, Inc., nor any of its employees shall be liable # for any direct, indirect, special, incidental or consequential damages # arising out of the use of its instruments or software even if Keithley # Instruments, inc., has been advised in advance of the possibility of such # damages. Such excluded damages shall include, but are not limited to: costs # of removal and installation, losses sustained as the result of injury to # any person, or damage to property. ############################################################################# ## ## ## This procedure contains some useful subroutines that can be called ## ## from other procedures. To call one of these routines, you must load ## ## the routine number into the MEM register (as well as loading other ## ## pararmeters into registers as required by the routine being called), ## ## and then execute a CALL KI UTILITIES. The caller is responsible for ## ## saving the previous value of MEM (and any other registers that will ## ## be used by the called routine) before making the CALL if those values ## ## will be needed after returning from this procedure. ## ## ## ## To add a routine, insert its code before the "End of UTILITIES" ## ## comment, and add the MATH MEM1=MEM1-1 and JMPZ x.xxx lines for the ## ## new routine, making sure x.xxx reflects the line number of the start ## ## of the new routine. The new routine should start with a MEME (to ## ## restore the exchange in 1.001) and should end with a JMP, which will ## ## jump to the end of the KI UTILITIES procedure. ## ## ## ############################################################################# # Move MEM into MEM1 for JMPZ lines 1.001 MEME # Test for Routine Number and jump to the appropriate routine 1.002 MATH MEM1=MEM1-1 1.003 JMPZ 1.012 1.004 MATH MEM1=MEM1-1 1.005 JMPZ 1.020 1.006 MATH MEM1=MEM1-1 1.007 JMPZ 1.027 1.008 MATH MEM1=MEM1-1 1.009 JMPZ 1.045 # Invalid Routine Number handler 1.010 DISP Invalid Routine Number in KI UTILITIES procedure. 1.010 DISP MEM1=[MEM1] 1.011 JMP #_____________________________________________________________________________ # Routine Number 1: Long Delay # Purpose: To delay longer than 32.767 seconds. # MEM1 contains the number of seconds to wait (0 to 1E+307). If the # MEM2 register contains a string, it will be displayed on the screen # during the delay time. A countdown of time left is also displayed. 1.012 MEME 1.013 JMP 1.017 1.014 HEAD [MEM2] ([MEM1]) 1.015 IEEE [D1000] 1.016 MATH MEM1=MEM1-1 1.017 JMPT 1.014 1.018 HEAD 1.019 JMP #_____________________________________________________________________________ # Routine Number 2: Wait for ESE 1 # Purpose: To wait for a Keithley 200x to finish a cal step by asserting # bit 5 of the serial poll byte. 1.020 MEME 1.021 IEEE [D500][SPL 32] 1.022 MEME 1.023 MATH MEM1=MEM1-32 1.024 JMPZ 1.026 0.1U 1.025 JMP 1.021 1.026 JMP #_____________________________________________________________________________ # Routine Number 3: Check Front/Rear switch on Keithley 200x at default IEEE # address. # Purpose: To verify that the front/rear switch is in the desired position. # Call this routine with M[1]=0 if you want the front/rear switch to # be in the REAR setting, or M[1]=1 if you want the FRONT inputs to # be selected. If the switch is currently not set to the desired # setting, a message will be displayed asking the user to set the # switch to the correct position. 1.027 MEME 1.028 MATH MEM1=M[1] 1.029 JMPZ 1.034 1.030 MATH MEM1=M[1]-1 1.031 JMPZ 1.036 1.032 DISP A value other than 0 or 1 has been specified for the 1.032 DISP desired setting of the FRONT/REAR switch. Please call 1.032 DISP the author of this program to determine what position it 1.032 DISP should be set to.[7] 1.033 JMP 1.034 MEM2 =[27][91]5mREAR[27][91]m 1.035 JMP 1.038 1.036 MEM2 =[27][91]5mFRONT[27][91]m 1.037 JMP 1.038 # Loop until switch is set to desired state 1.038 IEEE :SYST:FRSW?[D500][I] 1.039 MATH MEM1=M[1]-MEM 1.040 JMPZ 1.043 1.041 HEAD Please select the [MEM2] inputs on the 2001. 1.042 JMP 1.038 1.043 HEAD 1.044 JMP #_____________________________________________________________________________ # Routine Number 4: Check Error Queue in Keithley 200x at default IEEE # address. # Purpose: To determine if an error occured (usually during calibration) and # display any error code which did occur. If an error occured, the # operator is given the chance to repeat the step. MEM1 will be set # to 0 if the test is to be repeated, MEM1=1 if the error queue is # empty or the test is not to be repeated. 1.045 MEME 1.046 IEEE :SYST:ERR? 1.047 IEEE [D500][I] 1.048 MEME 1.049 JMPZ 1.051 1.050 OPBR Error [MEM1] has occured. 1.050 OPBR Do you want to repeat the last step? # MEM1= 0 or 1 here. Next line inverts MEM1 (0 => 1, 1 => 0) 1.051 MATH MEM1=-1*MEM1 + 1 1.052 JMP # End of UTILITIES 1.053 END